Skip to content

feat: preview image attachments in the chat composer - #735

Open
wyx20021207-create wants to merge 1 commit into
agegr:mainfrom
wyx20021207-create:feat/composer-image-preview
Open

feat: preview image attachments in the chat composer#735
wyx20021207-create wants to merge 1 commit into
agegr:mainfrom
wyx20021207-create:feat/composer-image-preview

Conversation

@wyx20021207-create

Copy link
Copy Markdown

Summary

  • Reuse the existing ImagePreview modal for attachments in the chat composer, before sending.
  • Preserve thumbnail sizing and keep the remove button separate from the preview trigger.
  • Reuse keyboard activation, Escape/backdrop dismissal, and focus restoration from the shared component.

Testing

  • Shared image-preview regression tests pass.
  • npm run lint and TypeScript tsc --noEmit pass in the development checkout.
  • Ran npm test on Windows and compared it with an untouched upstream/main checkout at 0d1df12: both have the same 14 failing tests (including Windows symlink/shell limitations and existing component assertions). No additional failing tests were observed.
  • Production build and browser E2E were not run locally.

Manual verification

  1. Paste, drag, or attach an image in the composer.
  2. Click the thumbnail to open the modal; close with Escape, backdrop, or the close button.
  3. Use the remove button and confirm it removes the attachment without opening the modal.

This PR is independent of the local-path preview feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant